# Contributor: Bart Ribbers <bribbers@disroot.org>
# Contributor: Danct12 <danct12@disroot.org>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=phoc
pkgver=0.4.1
pkgrel=0
pkgdesc="wlroots based Phone compositor for the Phosh shell"
arch="all !s390x" # no wlroots
url="https://source.puri.sm/Librem5/phoc"
license="GPL-3.0-only"
makedepends="meson ninja gobject-introspection-dev libinput-dev wayland-dev
	wayland-protocols libxkbcommon-dev wlroots-dev gnome-desktop-dev"
checkdepends="xvfb-run"
options="!check" # Needs fullblown EGL
source="https://source.puri.sm/Librem5/phoc/-/archive/v$pkgver/phoc-v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-v$pkgver"

build() {
	abuild-meson \
		-Dembed-wlroots=disabled \
		. output
	ninja -C output
}

check() {
	xvfb-run ninja -C output test
}

package() {
	DESTDIR="$pkgdir/" ninja -C output install
}
sha512sums="189b5f6b556f8dae776cf58584fba361efe4268ecacad42e68718c39664a19cd4e4c2fcf12c04a88ef4fdfc9bf1c59890ea49f6284296d45d461570a6bc5d854  phoc-v0.4.1.tar.gz"
